package com.mybatis.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.mybatis.dao.model.User;

public interface IUserMapper {
    @Insert("insert into user (id, username, password) values(#{id}, #{username}, #{password})")
    void insert(User user);

    @Delete("delete from user where id = #{id}")
    void delete(int id);

    @Update("update user set username = #{username}, password = #{password} where id = #{id}")
    void update(User user);

    @Select("select * from user")
    List<User> selects();
}
